package com.young.pattern.rest;

import com.young.pattern.simpleFactoryPattern.ChartClient;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: pattern
 * @description
 * @author: Young
 * @create: 2021-03-15 11:40
 **/
@Api("测试Controller")
@RestController
@RequestMapping("testController")
@Slf4j
public class TestController {

    @Autowired
    private ChartClient chartClient;

    @GetMapping("test")
    @ApiOperation(value = "test",nickname = "单纯的测试使用",httpMethod = "GET")
    public String test(){
        chartClient.testFactory();
        return "success";
    }
}
